package com.example.learning3;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class setting extends AppCompatActivity {

    Button button_function;
    Button button_analysis;
    Button button_self;
    Button button_gouba;
    TextView textView_gouba;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);
        text();
        seton();

    }
    public void text(){
        textView_gouba=findViewById(R.id.textView_gouba);
    }
    public void seton(){
        button_function=findViewById(R.id.button_function);
        button_analysis=findViewById(R.id.button_analysis);
        button_self=findViewById(R.id.button_self);
        button_gouba=findViewById(R.id.button_gouba);

        button_function.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent();
                intent.setClass(setting.this,MainActivity.class);
                startActivity(intent);
                setting.this.finish();
            }
        });
        button_analysis.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent();
                intent.setClass(setting.this,MainActivity3.class);
                startActivity(intent);
                setting.this.finish();
            }
        });
        button_self.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent();
                intent.setClass(setting.this,self.class);
                startActivity(intent);
                setting.this.finish();
            }
        });
        button_gouba.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                textView_gouba.setText("由于作者太懒所以还未开发");
            }
        });
    }
}